<!--
 * @Descripttion: damage报损报溢新增
 * @version:
 * @Author: cxguo
 * @Date: 2019-08-17 20:26:23
 * @LastEditors  : cxguo
 * @LastEditTime : 2019-12-27 17:40:49
 -->
<template>
  <div>
    {{ dataObj }}
    <el-form
      ref="form"
      :model="dataObj"
      :rules="rules"
      label-position="right"
      label-width="100px"
      size="mini"
    >
      <el-form-item label="角色: " prop="roles">
        <el-checkbox-group v-model="dataObj.roles" @change="onCheckedChange">
          <el-checkbox v-for="role in optionsData.roles" :key="role.value" :label="role.value">
            {{ role.label }}
          </el-checkbox>
        </el-checkbox-group>
      </el-form-item>
      <el-form-item label="" prop="roles" />
      <el-form-item label="仓库" prop="roles">
        <el-checkbox v-model="dataObj.viewotherShopStock" label="查看其他门店库存" />
        <span class="color-info"> ( 勾选后，可以在库存查询菜单下查看其他门店库存 )</span>
        <div>
          Table
          <p class="color-info">
            关联仓库后，可以查看仓库库存以及经营仓库业务。
            (其中，分店员工关联其他门店仓库只能查看其他门店仓库库存，不能经营其他门店业务。)
          </p>
        </div>
      </el-form-item>
      <el-form-item label="价格权限: " prop="roles">
        <el-checkbox-group v-model="dataObj.roles" @change="onCheckedChange">
          <el-checkbox v-for="role in optionsData.roles" :key="role.value" :label="role.value">
            {{ role.label }}
          </el-checkbox>
        </el-checkbox-group>
      </el-form-item>
      <el-form-item label="其他: " prop="roles">
        <p>
          <el-checkbox v-model="dataObj.viewOtherPeopleBill" label="查看他人单据" />
          <span class="color-info">(勾选后，可以查看他人经手的单据。分店仅限查看本门店的单据，总部可以查看所有人单据.)</span>
        </p>
        <p>
          <el-checkbox v-model="dataObj.viewOtherPeopleBill" label="作废他人单据" />
          <span class="color-info">(勾选后，可以作废他人经手的单据。分店仅限作废本门店的单据，总部可以作废所有人单据.)</span>
        </p>
        <p>
          <el-checkbox v-model="dataObj.viewOtherPeopleBill" label="查看他人客户" />
          <span class="color-info">(勾选后，可以查看关联他人的客户和客户应收欠款，开单时也可以选择关联他人的客户.)</span>
        </p>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { oftenuse } from '@/libs/mixins'
import { getOptions } from '@/api/store/shop.js'

export default {
  name: 'EmployeePermission',
  components: { },
  mixins: [oftenuse],
  props: {
  },
  data() {
    return {
      dataObj: { roles: [] },
      optionsData: {
        shop: [],
        roles: [{ value: '1', label: '管理员' }, { value: '2', label: '销售组' }]
      },
      rules: {
        shopId: [
          { required: true, message: '请选择所属门店！', trigger: 'blur' }
        ]
      }
    }
  },
  computed: {
  },
  watch: {
  },
  created() {
  },
  methods: {
    onCheckedChange() {},
    onShopChange() {

    }
  }
}
</script>

<style scoped>
</style>
